import request from '@/utils/request';

let baseURL = '/property-portal/v1/api/tMateriel';

// 物料项目列表
export const suppliesProjectListApi = params => {
	return request({
		url: `${baseURL}/queryProjectMaterielList`,
		method: 'post',
		data: params,
	});
};

// 物料-新增--------------------------------------------------------------------物料----------------------------------------------------------------------
export const suppliesAddApi = params => {
	return request({
		url: `${baseURL}/createMateriel`,
		method: 'post',
		data: params,
	});
};

// 物料-详情
export const suppliesInfoApi = params => {
	return request({
		url: `${baseURL}/findMaterielViewById`,
		method: 'post',
		data: params,
	});
};

// 物料-列表
export const suppliesListApi = params => {
	return request({
		url: `${baseURL}/queryMaterielList`,
		method: 'post',
		data: params,
	});
};

// 物料-入库
export const storageInApi = params => {
	return request({
		url: `${baseURL}/createMaterielInto`,
		method: 'post',
		data: params,
	});
};

// 出库列表
export const storageOutListApi = params => {
	return request({
		url: `${baseURL}/queryMaterielIntoList`,
		method: 'post',
		data: params,
	});
};

//出库
export const storageOutApi = params => {
	return request({
		url: `${baseURL}/createMaterielOut`,
		method: 'post',
		data: params,
	});
};

//出入库明细
export const storageInOutInfoListApi = params => {
	return request({
		url: `${baseURL}/queryMaterielDetailList`,
		method: 'post',
		data: params,
	});
};

//清单名称列表by项目
export const inventoryListByProjectApi = params => {
	return request({
		url: `${baseURL}/findMaterielInfoList`,
		method: 'post',
		data: params,
	});
};

//库存明细
export const storageInfoListApi = params => {
	return request({
		url: `${baseURL}/queryMaterielInventoryList`,
		method: 'post',
		data: params,
	});
};

//预警
export const warningApi = params => {
	return request({
		url: `${baseURL}/saveMaterielWarnConfig`,
		method: 'post',
		data: params,
	});
};

//预警详情
export const warningInfoApi = params => {
	return request({
		url: `${baseURL}/findMaterielWarnConfigView`,
		method: 'post',
		data: params,
	});
};